<template>
  <div id="deve2">
    <ul>
      <li>
        <div class="deve_none" v-if="none">
          <svg width="150" height="120" viewBox="0 0 150 120" fill="currentColor">
            <g fill="none" fill-rule="evenodd">
              <path
                fill="#EBEEF5"
                d="M67.757 83H45c-1.66 0-3-1.338-3-2.998V37.998A3.003 3.003 0 0 1 45 35h53.42v-3H45c-3.31 0-6 2.686-6 5.998v42.004A5.994 5.994 0 0 0 45 86h21.515l6.853 6.854a2.99 2.99 0 0 0 4.234 0L84.456 86H105c3.31 0 6-2.686 6-5.998v-36.54h-3v36.54A3.003 3.003 0 0 1 105 83H83.214l-7.728 7.728L67.756 83z"
                fill-rule="nonzero"
              />
              <path
                fill="#F7F8FA"
                d="M55 48.5c0-.828.67-1.5 1.508-1.5h26.984a1.5 1.5 0 1 1 0 3H56.508A1.5 1.5 0 0 1 55 48.5zm0 11c0-.828.677-1.5 1.495-1.5h37.01c.826 0 1.495.666 1.495 1.5 0 .828-.677 1.5-1.495 1.5h-37.01A1.494 1.494 0 0 1 55 59.5zm0 11c0-.828.677-1.5 1.495-1.5h37.01c.826 0 1.495.666 1.495 1.5 0 .828-.677 1.5-1.495 1.5h-37.01A1.494 1.494 0 0 1 55 70.5z"
              />
              <path
                fill="#EBEEF5"
                d="M94.868 50.46l18.92-18.92-2.83-2.827-18.918 18.92-2.12-2.123 18.917-18.918a3.005 3.005 0 0 1 4.245-.002l2.828 2.828a3.004 3.004 0 0 1-.002 4.245L96.99 52.58l-2.122-2.12zm-7.193 2.377l2.244-7.327 7.07 7.07-7.328 2.245c-1.575.482-2.473-.405-1.988-1.988z"
                fill-rule="nonzero"
              />
            </g>
          </svg>
          <div class="no_dynamic">
            暂无回答,点击查看
            <a href="index.html">推荐问题</a>
          </div>
        </div>
        <div v-for="usert in userts" :key="usert.aid">
          <span>回答了问题</span>
          <router-link tag='h3' :to="{path:'/Topic',query:{aid:usert.aid}}">{{usert.title}}</router-link>
          <span>{{usert.response}}人也评论了该回答</span>
          <p style="width: 600px; height: 25px; overflow: hidden;">
            {{usert.content}}
          </p>
          
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
   data(){
      return{
          none:true,
          userts:'',
          ownuids:''
      }
   },
   created(){
     this.ownuids=this.$store.state.ownUid
     this.$axios.get('/api/users/usert',{params:{uid:this.ownuids}})
                .then(res=>{
                    // console.log('res',res)
                    this.userts=res.data.data
                    console.log('userts',this.userts)
                    if(this.userts.length){
                      this.none=!this.none
                    }
                })
                .catch(err=>{
                    console.log('err:',err)
                })
   }

};
</script>
